home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / sndintrf.h < prev    next >
C/C++ Source or Header  |  2000-04-04  |  6KB  |  302 lines

  1. #ifndef SNDINTRF_H
  2. #define SNDINTRF_H
  3.  
  4.  
  5. struct MachineSound
  6. {
  7.     int sound_type;
  8.     void *sound_interface;
  9. };
  10.  
  11.  
  12. #include "sound/mixer.h"
  13. #include "sound/streams.h"
  14.  
  15. #if (HAS_SAMPLES)
  16. #include "sound/samples.h"
  17. #endif
  18. #if (HAS_DAC)
  19. #include "sound/dac.h"
  20. #endif
  21. #if (HAS_AY8910)
  22. #include "sound/ay8910.h"
  23. #endif
  24. #if (HAS_YM2203)
  25. #include "sound/2203intf.h"
  26. #endif
  27. #if (HAS_YM2608)
  28. #include "sound/2608intf.h"
  29. #endif
  30. #if (HAS_YM2612 || HAS_YM3438)
  31. #include "sound/2612intf.h"
  32. #endif
  33. #if (HAS_YM2151 || HAS_YM2151_ALT)
  34. #include "sound/2151intf.h"
  35. #endif
  36. #if (HAS_YM2608)
  37. #include "sound/2608intf.h"
  38. #endif
  39. #if (HAS_YM2610 || HAS_YM2610B)
  40. #include "sound/2610intf.h"
  41. #endif
  42. #if (HAS_YM3812 || HAS_YM3526 || HAS_Y8950)
  43. #include "sound/3812intf.h"
  44. #endif
  45. #if (HAS_YM2413)
  46. #include "sound/2413intf.h"
  47. #endif
  48. #if (HAS_SN76477)
  49. #include "sound/sn76477.h"
  50. #endif
  51. #if (HAS_SN76496)
  52. #include "sound/sn76496.h"
  53. #endif
  54. #if (HAS_POKEY)
  55. #include "sound/pokey.h"
  56. #endif
  57. #if (HAS_TIA)
  58. #include "sound/tiaintf.h"
  59. #endif
  60. #if (HAS_NES)
  61. #include "sound/nes_apu.h"
  62. #endif
  63. #if (HAS_ASTROCADE)
  64. #include "sound/astrocde.h"
  65. #endif
  66. #if (HAS_NAMCO)
  67. #include "sound/namco.h"
  68. #endif
  69. #if (HAS_TMS36XX)
  70. #include "sound/tms36xx.h"
  71. #endif
  72. #if (HAS_TMS5220)
  73. #include "sound/5220intf.h"
  74. #endif
  75. #if (HAS_VLM5030)
  76. #include "sound/vlm5030.h"
  77. #endif
  78. #if (HAS_ADPCM || HAS_OKIM6295)
  79. #include "sound/adpcm.h"
  80. #endif
  81. #if (HAS_MSM5205)
  82. #include "sound/msm5205.h"
  83. #endif
  84. #if (HAS_UPD7759)
  85. #include "sound/upd7759.h"
  86. #endif
  87. #if (HAS_HC55516)
  88. #include "sound/hc55516.h"
  89. #endif
  90. #if (HAS_K005289)
  91. #include "sound/k005289.h"
  92. #endif
  93. #if (HAS_K007232)
  94. #include "sound/k007232.h"
  95. #endif
  96. #if (HAS_K051649)
  97. #include "sound/k051649.h"
  98. #endif
  99. #if (HAS_K053260)
  100. #include "sound/k053260.h"
  101. #endif
  102. #if (HAS_SEGAPCM)
  103. #include "sound/segapcm.h"
  104. #endif
  105. #if (HAS_RF5C68)
  106. #include "sound/rf5c68.h"
  107. #endif
  108. #if (HAS_CEM3394)
  109. #include "sound/cem3394.h"
  110. #endif
  111. #if (HAS_C140)
  112. #include "sound/c140.h"
  113. #endif
  114. #if (HAS_QSOUND)
  115. #include "sound/qsound.h"
  116. #endif
  117. #if (HAS_SPEAKER)
  118. #include "sound/speaker.h"
  119. #endif
  120. #if (HAS_WAVE)
  121. #include "sound/wave.h"
  122. #endif
  123.  
  124.  
  125. enum
  126. {
  127.     SOUND_DUMMY,
  128. #if (HAS_CUSTOM)
  129.     SOUND_CUSTOM,
  130. #endif
  131. #if (HAS_SAMPLES)
  132.     SOUND_SAMPLES,
  133. #endif
  134. #if (HAS_DAC)
  135.     SOUND_DAC,
  136. #endif
  137. #if (HAS_AY8910)
  138.     SOUND_AY8910,
  139. #endif
  140. #if (HAS_YM2203)
  141.     SOUND_YM2203,
  142. #endif
  143. #if (HAS_YM2151)
  144.     SOUND_YM2151,
  145. #endif
  146. #if (HAS_YM2151_ALT)
  147.     SOUND_YM2151,
  148. #endif
  149. #if (HAS_YM2608)
  150.     SOUND_YM2608,
  151. #endif
  152. #if (HAS_YM2610)
  153.     SOUND_YM2610,
  154. #endif
  155. #if (HAS_YM2610B)
  156.     SOUND_YM2610B,
  157. #endif
  158. #if (HAS_YM2612)
  159.     SOUND_YM2612,
  160. #endif
  161. #if (HAS_YM3438)
  162.     SOUND_YM3438,    /* same as YM2612 */
  163. #endif
  164. #if (HAS_YM2413)
  165.     SOUND_YM2413,    /* YM3812 with predefined instruments */
  166. #endif
  167. #if (HAS_YM3812)
  168.     SOUND_YM3812,
  169. #endif
  170. #if (HAS_YM3526)
  171.     SOUND_YM3526,    /* 100% YM3812 compatible, less features */
  172. #endif
  173. #if (HAS_Y8950)
  174.     SOUND_Y8950,    /* YM3526 compatible with delta-T ADPCM */
  175. #endif
  176. #if (HAS_SN76477)
  177.     SOUND_SN76477,
  178. #endif
  179. #if (HAS_SN76496)
  180.     SOUND_SN76496,
  181. #endif
  182. #if (HAS_POKEY)
  183.     SOUND_POKEY,
  184. #endif
  185. #if (HAS_TIA)
  186.     SOUND_TIA,        /* stripped down Pokey */
  187. #endif
  188. #if (HAS_NES)
  189.     SOUND_NES,
  190. #endif
  191. #if (HAS_ASTROCADE)
  192.     SOUND_ASTROCADE,    /* Custom I/O chip from Bally/Midway */
  193. #endif
  194. #if (HAS_NAMCO)
  195.     SOUND_NAMCO,
  196. #endif
  197. #if (HAS_TMS36XX)
  198.     SOUND_TMS36XX,        /* currently TMS3615 and TMS3617 */
  199. #endif
  200. #if (HAS_TMS5220)
  201.     SOUND_TMS5220,
  202. #endif
  203. #if (HAS_VLM5030)
  204.     SOUND_VLM5030,
  205. #endif
  206. #if (HAS_ADPCM)
  207.     SOUND_ADPCM,
  208. #endif
  209. #if (HAS_OKIM6295)
  210.     SOUND_OKIM6295,    /* ROM-based ADPCM system */
  211. #endif
  212. #if (HAS_MSM5205)
  213.     SOUND_MSM5205,    /* CPU-based ADPCM system */
  214. #endif
  215. #if (HAS_UPD7759)
  216.     SOUND_UPD7759,    /* ROM-based ADPCM system */
  217. #endif
  218. #if (HAS_HC55516)
  219.     SOUND_HC55516,    /* Harris family of CVSD CODECs */
  220. #endif
  221. #if (HAS_K005289)
  222.     SOUND_K005289,    /* Konami 005289 */
  223. #endif
  224. #if (HAS_K007232)
  225.     SOUND_K007232,    /* Konami 007232 */
  226. #endif
  227. #if (HAS_K051649)
  228.     SOUND_K051649,    /* Konami 051649 */
  229. #endif
  230. #if (HAS_K053260)
  231.     SOUND_K053260,    /* Konami 053260 */
  232. #endif
  233. #if (HAS_SEGAPCM)
  234.     SOUND_SEGAPCM,
  235. #endif
  236. #if (HAS_RF5C68)
  237.     SOUND_RF5C68,
  238. #endif
  239. #if (HAS_CEM3394)
  240.     SOUND_CEM3394,
  241. #endif
  242. #if (HAS_C140)
  243.     SOUND_C140,
  244. #endif
  245. #if (HAS_QSOUND)
  246.     SOUND_QSOUND,
  247. #endif
  248. #if (HAS_SPEAKER)
  249.     SOUND_SPEAKER,
  250. #endif
  251. #if (HAS_WAVE)
  252.     SOUND_WAVE,
  253. #endif
  254.     SOUND_COUNT
  255. };
  256.  
  257.  
  258. /* structure for SOUND_CUSTOM sound drivers */
  259. struct CustomSound_interface
  260. {
  261.     int (*sh_start)(const struct MachineSound *msound);
  262.     void (*sh_stop)(void);
  263.     void (*sh_update)(void);
  264. };
  265.  
  266.  
  267. int sound_start(void);
  268. void sound_stop(void);
  269. void sound_update(void);
  270. void sound_reset(void);
  271.  
  272. /* returns name of the sound system */
  273. const char *sound_name(const struct MachineSound *msound);
  274. /* returns number of chips, or 0 if the sound type doesn't support multiple instances */
  275. int sound_num(const struct MachineSound *msound);
  276. /* returns clock rate, or 0 if the sound type doesn't support a clock frequency */
  277. int sound_clock(const struct MachineSound *msound);
  278.  
  279. int sound_scalebufferpos(int value);
  280.  
  281.  
  282. WRITE_HANDLER( soundlatch_w );
  283. READ_HANDLER( soundlatch_r );
  284. WRITE_HANDLER( soundlatch_clear_w );
  285. WRITE_HANDLER( soundlatch2_w );
  286. READ_HANDLER( soundlatch2_r );
  287. WRITE_HANDLER( soundlatch2_clear_w );
  288. WRITE_HANDLER( soundlatch3_w );
  289. READ_HANDLER( soundlatch3_r );
  290. WRITE_HANDLER( soundlatch3_clear_w );
  291. WRITE_HANDLER( soundlatch4_w );
  292. READ_HANDLER( soundlatch4_r );
  293. WRITE_HANDLER( soundlatch4_clear_w );
  294.  
  295. /* If you're going to use soundlatchX_clear_w, and the cleared value is
  296.    something other than 0x00, use this function from machine_init. Note
  297.    that this one call effects all 4 latches */
  298. void soundlatch_setclearedvalue(int value);
  299.  
  300.  
  301. #endif
  302.